
package com.aaa.ssm.entity;

import lombok.Data;

import javax.validation.constraints.*;

@Data
public class Grade {

    @NotNull(message = "成绩ID不能为空")
    @Min(value = 1, message = "成绩ID必须大于0")
    @Max(value = 100, message = "成绩ID必须小于等于100")
    private Integer id;

    @NotBlank(message = "成绩名称不能为空")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]+$", message = "成绩名称必须是中文")
    private String gname;
}



